home *** CD-ROM | disk | FTP | other *** search
- // PetriDish.h
- // By Charles G. Fleming, Educational Computing Services, Allegheny College.
- // You may freely copy, distribute and reuse this code.
- // Allegheny College and the author disclaim any warranty of any kind,
- // expressed or implied, as to its fitness for any particular use.
- // This work was partially supported by a grant from the Vira Heinz Endowment.
-
- #import <appkit/View.h>
- #import <appkit/color.h>
-
- @interface PetriDish:View
- {
- id clickCountTextField;
- id petriDishNXImage;
- id spotsNXImage;
- id gridNXImage;
- id spotNXImage;
- id inspector;
- id clickCursorNXImage;
- id clickCursor;
- BOOL gridState, okButtonPushed;
- float gridSpacing, petriDishRadius; // in centimeters
- float spotRadius; // in millimeters
- float agarRadius, dotRadius, gridDelta; // in pixels
- float petriRed, petriGreen, petriBlue, spotRed, spotGreen, spotBlue;
- int numSpots;
- NXColor agarColor, spotColor;
- NXSize spotNXImageSize;
- int clicks;
- }
-
- - (const char *)inspectorName;
- - setFrame:(const NXRect *)frameRect;
- - (const char *)inspectorName;
- - initFrame:(NXRect *)frameRect;
- - turnGridOn:(BOOL)flag withSpacing:(float)spacing;
- - setAgarRadius:(float)radius;
- - setAgarColor:(NXColor)color;
- - setSpotColor:(NXColor)color;
- - setSpotRadius:(float)radius;
- - setNumSpots:(int)spots;
- - drawSelf:(NXRect *)rects :(int)count;
- - drawPetriDishWithSpots:(int)spots;
- - drawSpotsInNXImage:(int)spots;
- - (float)gridSpacing;
- - (BOOL)gridState;
- - (float)petriDishRadius;
- - (int)numSpots;
- - (float)spotRadius;
- - okPushed:(BOOL)flag;
- - setInspector:anObject;
- - (NXColor) agarColor;
- - (NXColor) spotColor;
- - mouseDown:(NXEvent *)theEvent;
- - resetClickCount:sender;
- - (int)clickCount;
- - resetCursorRects;
- - write:(NXTypedStream *)typedStream;
- - read:(NXTypedStream *)typedStream;
- - awake;
- @end